package oop5;

import oop4.Dog;
import oop4.Pet;

/**
 * @author oldliu
 * @since 1.0
 */
public class InstanceTest {
    public static void main(String[] args) {
        Ren r2=new Ren("老吴",43,"女");
        boolean b1=r2 instanceof Object;
        System.out.println(b1);

        Object o=new Dolphin("小翠",88,77,"母");
        boolean b2=o instanceof Dog;
        System.out.println("o是海豚？"+b2);

        boolean b3=o instanceof Pet;
        System.out.println("b3是宠物？"+b3);

        boolean b4=o instanceof Dolphin;
        System.out.println("b4是海豚？"+b4);
    }
}
